<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
	<link rel="stylesheet" type="text/css" href="css/reset.css">
	<link rel="stylesheet" type="text/css" href="css/weui.min.css">
	<link rel="stylesheet" type="text/css" href="css/index.css">
	<title>嘉华金融</title>
	<style>
      .weui-uploader__bd {
        position: relative;
        width: 80px;
    	height: 81px;
      }
      .weui-uploader__input-box {
        position: absolute;
	    top: 0;
	    left: 0;
        /*float: none;*/
      }
      .weui-uploader__input-box.change:before {
            width: 0;
            height: 0;
      }
      .weui-uploader__input-box.change:after {
            width: 0px;
            height: 0px;
        }
  </style>
</head>
<body>
	<div>
		<div class="header">
			<div><div class="back"></div></div>
			<div>身份认证</div>
			<div><div class="user-img"></div></div>
		</div>
		<div class="main">
			<div class="enterprise-wrap">
				<div class="prompt">身份认证的会员可推广所属分销商，获得更多分润收益</div>
				<div class="enterprise-form">
					<div class="weui-cells weui-cells_form">
			            <div class="weui-cell">
			                <div class="weui-cell__hd"><label class="weui-label">认证类型</label></div>
			                <div class="weui-cell__bd">
			                    <select  name="select2" class="weui-select">
			                        <option value="1">个人</option>
			                    </select>
			                </div>
			            </div>
			            <div class="weui-cell">
			                <div class="weui-cell__hd"><label class="weui-label">姓名</label></div>
			                <div class="weui-cell__bd">
			                    <input class="weui-input comp-name person" pl="请输入姓名">
			                </div>
			            </div>
			            <div class="weui-cell">
			                <div class="weui-cell__hd"><label class="weui-label">身份证号码</label></div>
			                <div class="weui-cell__bd">
			                    <input class="weui-input user-card person" pl="请输入身份证号码">
			                </div>
			            </div>
			            <div class="weui-cell">
			                <div class="weui-cell__hd"><label class="weui-label">城市</label></div>
			                <div class="weui-cell__bd">
			                    <input class="weui-input comp-person city" placeholder="请选择城市" id='userResult' readonly>
			                </div>
			                <div class="weui-cell__ft">
			                	<div id="showPicker" class="right choose-city  right-code">
									<div  class="city-code"></div>
								</div>
			                </div>
			            </div>
			            <div class="weui-cell">
			                <div class="weui-cell__hd upload-label"><label class="weui-label">身份证件</label></div>
			                <div class="weui-cell__bd">
								<div class="weui-uploader__bd">
                                    <ul class="weui-uploader__files uploader-file1">
                                    </ul>
                                    <div class="weui-uploader__input-box">
                                        <input id="uploaderInput" class="weui-uploader__input js_file input-file1" type="file" accept="image/*" multiple>
                                    </div>
                                </div>
			                </div>
			            </div>
        			</div>
        			<div class="modify-btn-wrap border-bottom">
        				<div class="error-content company-error"></div>
			        	<div class="modify-btn personal-btn h-btn" id="btn"><a>认证</a></div>
			        </div>  
				</div>
			</div>
		</div>
		<div class="js_dialog" id="iosDialog2" style="display:none">
            <div class="weui-mask"></div>
            <div class="weui-dialog">
                <div class="weui-dialog__bd">图片太大，不允许上传</div>
                <div class="weui-dialog__ft">
                    <a href="javascript:;" class="weui-dialog__btn weui-dialog__btn_primary" id="closeImg">知道了</a>
                </div>
            </div>
        </div>   
	</div>
	<script src="js/jquery-3.2.1.min.js"></script>
	<script src="js/weui.min.js"></script>
	<script src="js/city-data.js"></script>
	<script src="js/index.js"></script>
	<script src="js/uploader.js"></script>
	<script>
		$("#closeImg").click(function() {
			$("#iosDialog2").css("display","none")
		})
		$('.person').keyup(function(){
			var fz = 0;
			$('.person').each(function(){
				if($(this).val()=="" || $(this).val() == $(this).attr("pl") ){
					$(".h-btn").removeClass("active")
					return;
				}
				fz++;
			})
			if(fz == $('.person').length && $(".city").val() !== "" && $(".uploader-file1").children().length>0){
				$(".h-btn").addClass("active")
			}
		})
		$('#showPicker').on('click', function () {
		    weui.picker(cityData, {
		        onConfirm: function (result) {
		        	$("#userResult").val(cityData[result].label)
		        	$("#userResult").css('color',"#000");
		        	$('.person').each(function() {
		        		if($(this).val() == $(this).attr("pl") || $(".uploader-file1").children().length == 0) {
		        			$(".h-btn").removeClass("active");
		        		}else {
		        			$(".h-btn").addClass("active");
		        		}
		        	})
		        }
		    });
		});
		$('.input-file1').on("change", function(e){
			$('.person').each(function(){
				if($(this).val() == $(this).attr("pl") || $(".city").val() == ""){
					$(".h-btn").removeClass("active")
					return;
				}
				$(".h-btn").addClass("active");
			})
		})
	</script>
</body>
</html>